﻿
namespace Mockery.Core
{
    /// <summary>
    /// IArrangement holds the working components for registering mocks
    /// </summary>
    public interface IArrangement
    {
        #region Mocking Actions

        /// <summary>
        /// Add a strict mock to the arrangement state
        /// </summary>
        /// <typeparam name="TInterface">the interface being mocked</typeparam>
        /// <returns>mocked instance</returns>
        TInterface AddStrictMock<TInterface>();

        /// <summary>
        /// Add a dynamic mock to the arrangement state
        /// </summary>
        /// <typeparam name="TInterface">the interface being mocked</typeparam>
        /// <red instanceturns>mocked instance</returns>
        TInterface AddDynamicMock<TInterface>() where TInterface : class;

        /// <summary>
        /// Add a stub to the arrangement state
        /// </summary>
        /// <typeparam name="TInterface">the interface being stubbed</typeparam>
        /// <returns>stubbed instance</returns>
        TInterface AddStub<TInterface>();

        /// <summary>
        /// Al low for the adding of a manually mocked type to the arrangement
        /// </summary>
        /// <typeparam name="TInterface">Type to resolve it as</typeparam>
        /// <param name="instance">mock instance</param>
        void AddMockedType<TInterface>(TInterface instance);

        /// <summary>
        /// Retrieve a mock from the arrangement by type
        /// </summary>b
        /// <typeparam name="TInterface">Type to retrieve</typeparam>
        /// <returns>mock instance</returns>
        TInterface GetMockedType<TInterface>();

        #endregion

    }
}
